package com.hd.day03;


import org.junit.Test;

import java.util.Scanner;

public class LearnArray01 {
    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);




    }

    public void add(){
        System.out.println("hh");
    };

    @Test
    public void test() {
        Integer i = 3434;
        Integer i1 = 3434;

        //System.out.println(i.equals(i1));
        int a = Integer.parseInt("999");
        int d = Integer.parseInt(("999"));
        System.out.println(a == d);
        System.out.println(a);
        System.out.println(d);

        Integer b = Integer.valueOf("999");
        Integer c = Integer.valueOf("999");
        System.out.println(b == c);


        System.out.println(b);

        int[] arr01 = {1, 2};
        int[] arr02 = new int[]{1, 2};

        int[][] as = new int[2][];
        as[0] = arr01;
        as[1] = arr02;

        arr01[0] = 10;
        arr01[1] = 12;


        //for (int i : arr01) {
        //    System.out.println(i);
        //}
    }

    @Test
    public void test02() {
        Integer a = 993;
        Integer b = 993;
        //System.out.println(a == b);


        String str = "ab";
        System.out.println(str.hashCode());

    }

    @Test
    // 字符串
    public void test03() {
        String str2 = new String("123");
        String str3 = str2.intern();
        String str4 = "123";


        System.out.println(str2 == str3);



        System.out.println(str2.intern() == str3);
        System.out.println(str3 == str4);

    }
}
